<?php

class Application_Model_Profit extends Application_Model_ModelAbstract
{
    protected $profit_id;
    protected $profit_date;
    protected $profit_summ;

    public function setProfitId($value)
    {
         $this->profit_id = $value;
    }

    public function setProfitDate($value)
    {
        $this->profit_date = $value;
    }

    public function setProfitSumm($value)
    {
        $this->profit_summ = $value;
    }

    public function getProfitId()
    {
        return $this->profit_id;
    }

    public function getProfitDate()
    {
        if ($this->profit_date) {
            return $this->profit_date;
        }

        return date('Y-m-d H:i:s');

    }

    public function getProfitSumm()
    {
        return $this->profit_summ;
    }

    public function getYear()
    {
        if ($this->profit_date) {
            return date('Y', strtotime($this->profit_date));
        }

        return date('Y');
    }

    public function getMonth()
    {
        if ($this->profit_date) {
            return date('m', strtotime($this->profit_date));
        }

        return date('m');
    }

    public function getDay()
    {
        if ($this->profit_date) {
            return date('d', strtotime($this->profit_date));
        }

        return date('d');
    }

}
